Integrand size = 29, antiderivative size = 165 \[ \int \tan (c+d x) (a+b \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\left (\left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right ) x\right )-\frac {\left (a^3 A-3 a A b^2-3 a^2 b B+b^3 B\right ) \log (\cos (c+d x))}{d}+\frac {b \left (a^2 A-A b^2-2 a b B\right ) \tan (c+d x)}{d}+\frac {(a A-b B) (a+b \tan (c+d x))^2}{2 d}+\frac {A (a+b \tan (c+d x))^3}{3 d}+\frac {B (a+b \tan (c+d x))^4}{4 b d} \]
-(3*A*a^2*b-A*b^3+B*a^3-3*B*a*b^2)*x-(A*a^3-3*A*a*b^2-3*B*a^2*b+B*b^3)*ln( cos(d*x+c))/d+b*(A*a^2-A*b^2-2*B*a*b)*tan(d*x+c)/d+1/2*(A*a-B*b)*(a+b*tan( d*x+c))^2/d+1/3*A*(a+b*tan(d*x+c))^3/d+1/4*B*(a+b*tan(d*x+c))^4/b/d
Result contains complex when optimal does not.
Time = 1.58 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.27 \[ \int \tan (c+d x) (a+b \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {-6 i A (a+i b)^4 \log (i-\tan (c+d x))+6 i A (a-i b)^4 \log (i+\tan (c+d x))-12 A b^2 \left (-6 a^2+b^2\right ) \tan (c+d x)+24 a A b^3 \tan ^2(c+d x)+4 A b^4 \tan ^3(c+d x)+3 B (a+b \tan (c+d x))^4-6 (a A+b B) \left ((i a-b)^3 \log (i-\tan (c+d x))-(i a+b)^3 \log (i+\tan (c+d x))+6 a b^2 \tan (c+d x)+b^3 \tan ^2(c+d x)\right )}{12 b d} \]
((-6*I)*A*(a + I*b)^4*Log[I - Tan[c + d*x]] + (6*I)*A*(a - I*b)^4*Log[I + Tan[c + d*x]] - 12*A*b^2*(-6*a^2 + b^2)*Tan[c + d*x] + 24*a*A*b^3*Tan[c + d*x]^2 + 4*A*b^4*Tan[c + d*x]^3 + 3*B*(a + b*Tan[c + d*x])^4 - 6*(a*A + b* B)*((I*a - b)^3*Log[I - Tan[c + d*x]] - (I*a + b)^3*Log[I + Tan[c + d*x]] + 6*a*b^2*Tan[c + d*x] + b^3*Tan[c + d*x]^2))/(12*b*d)
Time = 0.74 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.345, Rules used = {3042, 4075, 3042, 4011, 3042, 4011, 3042, 4008, 3042, 3956}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan (c+d x) (a+b \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x) (a+b \tan (c+d x))^3 (A+B \tan (c+d x))dx\) |
\(\Big \downarrow \) 4075 |
\(\displaystyle \int (A \tan (c+d x)-B) (a+b \tan (c+d x))^3dx+\frac {B (a+b \tan (c+d x))^4}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (A \tan (c+d x)-B) (a+b \tan (c+d x))^3dx+\frac {B (a+b \tan (c+d x))^4}{4 b d}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int (a+b \tan (c+d x))^2 (-A b-a B+(a A-b B) \tan (c+d x))dx+\frac {A (a+b \tan (c+d x))^3}{3 d}+\frac {B (a+b \tan (c+d x))^4}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \tan (c+d x))^2 (-A b-a B+(a A-b B) \tan (c+d x))dx+\frac {A (a+b \tan (c+d x))^3}{3 d}+\frac {B (a+b \tan (c+d x))^4}{4 b d}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int (a+b \tan (c+d x)) \left (-B a^2-2 A b a+b^2 B+\left (A a^2-2 b B a-A b^2\right ) \tan (c+d x)\right )dx+\frac {(a A-b B) (a+b \tan (c+d x))^2}{2 d}+\frac {A (a+b \tan (c+d x))^3}{3 d}+\frac {B (a+b \tan (c+d x))^4}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \tan (c+d x)) \left (-B a^2-2 A b a+b^2 B+\left (A a^2-2 b B a-A b^2\right ) \tan (c+d x)\right )dx+\frac {(a A-b B) (a+b \tan (c+d x))^2}{2 d}+\frac {A (a+b \tan (c+d x))^3}{3 d}+\frac {B (a+b \tan (c+d x))^4}{4 b d}\) |
\(\Big \downarrow \) 4008 |
\(\displaystyle \left (a^3 A-3 a^2 b B-3 a A b^2+b^3 B\right ) \int \tan (c+d x)dx+\frac {b \left (a^2 A-2 a b B-A b^2\right ) \tan (c+d x)}{d}-x \left (a^3 B+3 a^2 A b-3 a b^2 B-A b^3\right )+\frac {(a A-b B) (a+b \tan (c+d x))^2}{2 d}+\frac {A (a+b \tan (c+d x))^3}{3 d}+\frac {B (a+b \tan (c+d x))^4}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \left (a^3 A-3 a^2 b B-3 a A b^2+b^3 B\right ) \int \tan (c+d x)dx+\frac {b \left (a^2 A-2 a b B-A b^2\right ) \tan (c+d x)}{d}-x \left (a^3 B+3 a^2 A b-3 a b^2 B-A b^3\right )+\frac {(a A-b B) (a+b \tan (c+d x))^2}{2 d}+\frac {A (a+b \tan (c+d x))^3}{3 d}+\frac {B (a+b \tan (c+d x))^4}{4 b d}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {b \left (a^2 A-2 a b B-A b^2\right ) \tan (c+d x)}{d}-\frac {\left (a^3 A-3 a^2 b B-3 a A b^2+b^3 B\right ) \log (\cos (c+d x))}{d}-x \left (a^3 B+3 a^2 A b-3 a b^2 B-A b^3\right )+\frac {(a A-b B) (a+b \tan (c+d x))^2}{2 d}+\frac {A (a+b \tan (c+d x))^3}{3 d}+\frac {B (a+b \tan (c+d x))^4}{4 b d}\) |
-((3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*x) - ((a^3*A - 3*a*A*b^2 - 3*a^2 *b*B + b^3*B)*Log[Cos[c + d*x]])/d + (b*(a^2*A - A*b^2 - 2*a*b*B)*Tan[c + d*x])/d + ((a*A - b*B)*(a + b*Tan[c + d*x])^2)/(2*d) + (A*(a + b*Tan[c + d *x])^3)/(3*d) + (B*(a + b*Tan[c + d*x])^4)/(4*b*d)
3.3.49.3.1 Defintions of rubi rules used
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(a*c - b*d)*x, x] + (Simp[b*d*(Tan[e + f*x]/f), x] + Simp[(b*c + a*d) Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[B *d*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f* x])^m*Simp[A*c - B*d + (B*c + A*d)*Tan[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && !LeQ[m, -1]
Time = 0.09 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.09
method | result | size |
norman | \(\left (-3 A \,a^{2} b +A \,b^{3}-B \,a^{3}+3 B a \,b^{2}\right ) x +\frac {\left (3 A \,a^{2} b -A \,b^{3}+B \,a^{3}-3 B a \,b^{2}\right ) \tan \left (d x +c \right )}{d}+\frac {B \,b^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{4 d}+\frac {b \left (3 A a b +3 B \,a^{2}-B \,b^{2}\right ) \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}+\frac {b^{2} \left (A b +3 B a \right ) \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}+\frac {\left (A \,a^{3}-3 A a \,b^{2}-3 B \,a^{2} b +B \,b^{3}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) | \(180\) |
parts | \(\frac {\left (A \,b^{3}+3 B a \,b^{2}\right ) \left (\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {\left (3 A a \,b^{2}+3 B \,a^{2} b \right ) \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}\right )}{d}+\frac {\left (3 A \,a^{2} b +B \,a^{3}\right ) \left (\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {A \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) a^{3}}{2 d}+\frac {B \,b^{3} \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}+\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}\right )}{d}\) | \(183\) |
derivativedivides | \(\frac {\frac {B \,b^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{4}+\frac {A \,b^{3} \left (\tan ^{3}\left (d x +c \right )\right )}{3}+B a \,b^{2} \left (\tan ^{3}\left (d x +c \right )\right )+\frac {3 A a \,b^{2} \left (\tan ^{2}\left (d x +c \right )\right )}{2}+\frac {3 B \,a^{2} b \left (\tan ^{2}\left (d x +c \right )\right )}{2}-\frac {B \,b^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2}+3 A \,a^{2} b \tan \left (d x +c \right )-A \,b^{3} \tan \left (d x +c \right )+B \tan \left (d x +c \right ) a^{3}-3 B a \,b^{2} \tan \left (d x +c \right )+\frac {\left (A \,a^{3}-3 A a \,b^{2}-3 B \,a^{2} b +B \,b^{3}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (-3 A \,a^{2} b +A \,b^{3}-B \,a^{3}+3 B a \,b^{2}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{d}\) | \(213\) |
default | \(\frac {\frac {B \,b^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{4}+\frac {A \,b^{3} \left (\tan ^{3}\left (d x +c \right )\right )}{3}+B a \,b^{2} \left (\tan ^{3}\left (d x +c \right )\right )+\frac {3 A a \,b^{2} \left (\tan ^{2}\left (d x +c \right )\right )}{2}+\frac {3 B \,a^{2} b \left (\tan ^{2}\left (d x +c \right )\right )}{2}-\frac {B \,b^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2}+3 A \,a^{2} b \tan \left (d x +c \right )-A \,b^{3} \tan \left (d x +c \right )+B \tan \left (d x +c \right ) a^{3}-3 B a \,b^{2} \tan \left (d x +c \right )+\frac {\left (A \,a^{3}-3 A a \,b^{2}-3 B \,a^{2} b +B \,b^{3}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (-3 A \,a^{2} b +A \,b^{3}-B \,a^{3}+3 B a \,b^{2}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{d}\) | \(213\) |
parallelrisch | \(\frac {3 B \,b^{3} \left (\tan ^{4}\left (d x +c \right )\right )+4 A \,b^{3} \left (\tan ^{3}\left (d x +c \right )\right )+12 B a \,b^{2} \left (\tan ^{3}\left (d x +c \right )\right )-36 A \,a^{2} b d x +12 A \,b^{3} d x +18 A a \,b^{2} \left (\tan ^{2}\left (d x +c \right )\right )-12 B x \,a^{3} d +36 B a \,b^{2} d x +18 B \,a^{2} b \left (\tan ^{2}\left (d x +c \right )\right )-6 B \,b^{3} \left (\tan ^{2}\left (d x +c \right )\right )+6 A \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) a^{3}-18 A \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) a \,b^{2}+36 A \,a^{2} b \tan \left (d x +c \right )-12 A \,b^{3} \tan \left (d x +c \right )-18 B \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) a^{2} b +6 B \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) b^{3}+12 B \tan \left (d x +c \right ) a^{3}-36 B a \,b^{2} \tan \left (d x +c \right )}{12 d}\) | \(248\) |
risch | \(-\frac {6 i B \,a^{2} b c}{d}-3 i B \,a^{2} b x +\frac {2 i \left (9 A \,a^{2} b -12 B a \,b^{2}+3 B \,a^{3}-4 A \,b^{3}-18 B a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+9 A \,a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+27 A \,a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+6 i B \,b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+27 A \,a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-36 B a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-30 B a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+6 i B \,b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+6 i B \,b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+9 B \,a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-10 A \,b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-6 A \,b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+3 B \,a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+9 B \,a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-12 A \,b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-18 i B \,a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}-9 i A a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-9 i B \,a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}-18 i A a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-9 i A a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-9 i B \,a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {6 i A a \,b^{2} c}{d}-3 A \,a^{2} b x +A \,b^{3} x -B \,a^{3} x +3 B a \,b^{2} x +i A \,a^{3} x -3 i A a \,b^{2} x +i B \,b^{3} x +\frac {2 i a^{3} A c}{d}+\frac {2 i B \,b^{3} c}{d}-\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) A}{d}+\frac {3 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) A a \,b^{2}}{d}+\frac {3 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) B \,a^{2} b}{d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) B \,b^{3}}{d}\) | \(579\) |
(-3*A*a^2*b+A*b^3-B*a^3+3*B*a*b^2)*x+(3*A*a^2*b-A*b^3+B*a^3-3*B*a*b^2)/d*t an(d*x+c)+1/4*B*b^3/d*tan(d*x+c)^4+1/2*b*(3*A*a*b+3*B*a^2-B*b^2)/d*tan(d*x +c)^2+1/3*b^2*(A*b+3*B*a)/d*tan(d*x+c)^3+1/2*(A*a^3-3*A*a*b^2-3*B*a^2*b+B* b^3)/d*ln(1+tan(d*x+c)^2)
Time = 0.25 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.08 \[ \int \tan (c+d x) (a+b \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {3 \, B b^{3} \tan \left (d x + c\right )^{4} + 4 \, {\left (3 \, B a b^{2} + A b^{3}\right )} \tan \left (d x + c\right )^{3} - 12 \, {\left (B a^{3} + 3 \, A a^{2} b - 3 \, B a b^{2} - A b^{3}\right )} d x + 6 \, {\left (3 \, B a^{2} b + 3 \, A a b^{2} - B b^{3}\right )} \tan \left (d x + c\right )^{2} - 6 \, {\left (A a^{3} - 3 \, B a^{2} b - 3 \, A a b^{2} + B b^{3}\right )} \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right ) + 12 \, {\left (B a^{3} + 3 \, A a^{2} b - 3 \, B a b^{2} - A b^{3}\right )} \tan \left (d x + c\right )}{12 \, d} \]
1/12*(3*B*b^3*tan(d*x + c)^4 + 4*(3*B*a*b^2 + A*b^3)*tan(d*x + c)^3 - 12*( B*a^3 + 3*A*a^2*b - 3*B*a*b^2 - A*b^3)*d*x + 6*(3*B*a^2*b + 3*A*a*b^2 - B* b^3)*tan(d*x + c)^2 - 6*(A*a^3 - 3*B*a^2*b - 3*A*a*b^2 + B*b^3)*log(1/(tan (d*x + c)^2 + 1)) + 12*(B*a^3 + 3*A*a^2*b - 3*B*a*b^2 - A*b^3)*tan(d*x + c ))/d
Leaf count of result is larger than twice the leaf count of optimal. 311 vs. \(2 (151) = 302\).
Time = 0.16 (sec) , antiderivative size = 311, normalized size of antiderivative = 1.88 \[ \int \tan (c+d x) (a+b \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\begin {cases} \frac {A a^{3} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} - 3 A a^{2} b x + \frac {3 A a^{2} b \tan {\left (c + d x \right )}}{d} - \frac {3 A a b^{2} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {3 A a b^{2} \tan ^{2}{\left (c + d x \right )}}{2 d} + A b^{3} x + \frac {A b^{3} \tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {A b^{3} \tan {\left (c + d x \right )}}{d} - B a^{3} x + \frac {B a^{3} \tan {\left (c + d x \right )}}{d} - \frac {3 B a^{2} b \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {3 B a^{2} b \tan ^{2}{\left (c + d x \right )}}{2 d} + 3 B a b^{2} x + \frac {B a b^{2} \tan ^{3}{\left (c + d x \right )}}{d} - \frac {3 B a b^{2} \tan {\left (c + d x \right )}}{d} + \frac {B b^{3} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {B b^{3} \tan ^{4}{\left (c + d x \right )}}{4 d} - \frac {B b^{3} \tan ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (A + B \tan {\left (c \right )}\right ) \left (a + b \tan {\left (c \right )}\right )^{3} \tan {\left (c \right )} & \text {otherwise} \end {cases} \]
Piecewise((A*a**3*log(tan(c + d*x)**2 + 1)/(2*d) - 3*A*a**2*b*x + 3*A*a**2 *b*tan(c + d*x)/d - 3*A*a*b**2*log(tan(c + d*x)**2 + 1)/(2*d) + 3*A*a*b**2 *tan(c + d*x)**2/(2*d) + A*b**3*x + A*b**3*tan(c + d*x)**3/(3*d) - A*b**3* tan(c + d*x)/d - B*a**3*x + B*a**3*tan(c + d*x)/d - 3*B*a**2*b*log(tan(c + d*x)**2 + 1)/(2*d) + 3*B*a**2*b*tan(c + d*x)**2/(2*d) + 3*B*a*b**2*x + B* a*b**2*tan(c + d*x)**3/d - 3*B*a*b**2*tan(c + d*x)/d + B*b**3*log(tan(c + d*x)**2 + 1)/(2*d) + B*b**3*tan(c + d*x)**4/(4*d) - B*b**3*tan(c + d*x)**2 /(2*d), Ne(d, 0)), (x*(A + B*tan(c))*(a + b*tan(c))**3*tan(c), True))
Time = 0.35 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.08 \[ \int \tan (c+d x) (a+b \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {3 \, B b^{3} \tan \left (d x + c\right )^{4} + 4 \, {\left (3 \, B a b^{2} + A b^{3}\right )} \tan \left (d x + c\right )^{3} + 6 \, {\left (3 \, B a^{2} b + 3 \, A a b^{2} - B b^{3}\right )} \tan \left (d x + c\right )^{2} - 12 \, {\left (B a^{3} + 3 \, A a^{2} b - 3 \, B a b^{2} - A b^{3}\right )} {\left (d x + c\right )} + 6 \, {\left (A a^{3} - 3 \, B a^{2} b - 3 \, A a b^{2} + B b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 12 \, {\left (B a^{3} + 3 \, A a^{2} b - 3 \, B a b^{2} - A b^{3}\right )} \tan \left (d x + c\right )}{12 \, d} \]
1/12*(3*B*b^3*tan(d*x + c)^4 + 4*(3*B*a*b^2 + A*b^3)*tan(d*x + c)^3 + 6*(3 *B*a^2*b + 3*A*a*b^2 - B*b^3)*tan(d*x + c)^2 - 12*(B*a^3 + 3*A*a^2*b - 3*B *a*b^2 - A*b^3)*(d*x + c) + 6*(A*a^3 - 3*B*a^2*b - 3*A*a*b^2 + B*b^3)*log( tan(d*x + c)^2 + 1) + 12*(B*a^3 + 3*A*a^2*b - 3*B*a*b^2 - A*b^3)*tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 2670 vs. \(2 (159) = 318\).
Time = 2.18 (sec) , antiderivative size = 2670, normalized size of antiderivative = 16.18 \[ \int \tan (c+d x) (a+b \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\text {Too large to display} \]
-1/12*(12*B*a^3*d*x*tan(d*x)^4*tan(c)^4 + 36*A*a^2*b*d*x*tan(d*x)^4*tan(c) ^4 - 36*B*a*b^2*d*x*tan(d*x)^4*tan(c)^4 - 12*A*b^3*d*x*tan(d*x)^4*tan(c)^4 + 6*A*a^3*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2 *tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)^4*tan(c)^4 - 18*B*a^2*b*l og(4*(tan(d*x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)^4*tan(c)^4 - 18*A*a*b^2*log(4*(tan(d* x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)^4*tan(c)^4 + 6*B*b^3*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1)) *tan(d*x)^4*tan(c)^4 - 48*B*a^3*d*x*tan(d*x)^3*tan(c)^3 - 144*A*a^2*b*d*x* tan(d*x)^3*tan(c)^3 + 144*B*a*b^2*d*x*tan(d*x)^3*tan(c)^3 + 48*A*b^3*d*x*t an(d*x)^3*tan(c)^3 - 18*B*a^2*b*tan(d*x)^4*tan(c)^4 - 18*A*a*b^2*tan(d*x)^ 4*tan(c)^4 + 9*B*b^3*tan(d*x)^4*tan(c)^4 - 24*A*a^3*log(4*(tan(d*x)^2*tan( c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)^3*tan(c)^3 + 72*B*a^2*b*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan (d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d *x)^3*tan(c)^3 + 72*A*a*b^2*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)^3*tan(c) ^3 - 24*B*b^3*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x )^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)^3*tan(c)^3 + 12*B*a...
Time = 8.24 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.10 \[ \int \tan (c+d x) (a+b \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=x\,\left (-B\,a^3-3\,A\,a^2\,b+3\,B\,a\,b^2+A\,b^3\right )-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {B\,b^3}{2}-\frac {3\,a\,b\,\left (A\,b+B\,a\right )}{2}\right )}{d}-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (-B\,a^3-3\,A\,a^2\,b+3\,B\,a\,b^2+A\,b^3\right )}{d}+\frac {\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )\,\left (\frac {A\,a^3}{2}-\frac {3\,B\,a^2\,b}{2}-\frac {3\,A\,a\,b^2}{2}+\frac {B\,b^3}{2}\right )}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (\frac {A\,b^3}{3}+B\,a\,b^2\right )}{d}+\frac {B\,b^3\,{\mathrm {tan}\left (c+d\,x\right )}^4}{4\,d} \]
x*(A*b^3 - B*a^3 - 3*A*a^2*b + 3*B*a*b^2) - (tan(c + d*x)^2*((B*b^3)/2 - ( 3*a*b*(A*b + B*a))/2))/d - (tan(c + d*x)*(A*b^3 - B*a^3 - 3*A*a^2*b + 3*B* a*b^2))/d + (log(tan(c + d*x)^2 + 1)*((A*a^3)/2 + (B*b^3)/2 - (3*A*a*b^2)/ 2 - (3*B*a^2*b)/2))/d + (tan(c + d*x)^3*((A*b^3)/3 + B*a*b^2))/d + (B*b^3* tan(c + d*x)^4)/(4*d)